import com.zaxxer.hikari.HikariDataSource;

import java.sql.SQLException;

public class Hello {
    public static <SQLException extends Throwable> void main(String[] args) {
        HikariDataSource dataSource = new HikariDataSource();
        dataSource.setJdbcUrl("jdbc:mysql://localhost:3306/jdbc");
        dataSource.setUsername("root");
        dataSource.setPassword("root");
        dataSource.setDriverClassName("com.mysql.jdbc.Driver");
        dataSource.setMaximumPoolSize(10);
        dataSource.setMinimumIdle(5);
        dataSource.setMaxLifetime(10000);
        dataSource.setConnectionTimeout(50000);




        try {
            if (dataSource.getConnection() != null) {
                System.out.println("Connection Successful");
            } else {
                System.out.println("Connection Failed");
            }
        } catch (java.sql.SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
